/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ucb.ProjetoFinal.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 *
 * @author DCBorges
 */
@Entity
@Table(name = "sdctb018_cadin")
public class Sdctb018Cadin implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_CPF_CGC")
    private Long nuCpfCgc;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IC_PESSOA")
    private char icPessoa;

    public Sdctb018Cadin() {
    }

    public Sdctb018Cadin(Long nuCpfCgc) {
        this.nuCpfCgc = nuCpfCgc;
    }

    public Sdctb018Cadin(Long nuCpfCgc, char icPessoa) {
        this.nuCpfCgc = nuCpfCgc;
        this.icPessoa = icPessoa;
    }

    public Long getNuCpfCgc() {
        return nuCpfCgc;
    }

    public void setNuCpfCgc(Long nuCpfCgc) {
        this.nuCpfCgc = nuCpfCgc;
    }

    public char getIcPessoa() {
        return icPessoa;
    }

    public void setIcPessoa(char icPessoa) {
        this.icPessoa = icPessoa;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nuCpfCgc != null ? nuCpfCgc.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sdctb018Cadin)) {
            return false;
        }
        Sdctb018Cadin other = (Sdctb018Cadin) object;
        if ((this.nuCpfCgc == null && other.nuCpfCgc != null) || (this.nuCpfCgc != null && !this.nuCpfCgc.equals(other.nuCpfCgc))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ucb.ProjetoFinal.domain.Sdctb018Cadin[ nuCpfCgc=" + nuCpfCgc + " ]";
    }
    
}
